package com.javasea.nio.chat.client;

import com.javasea.nio.chat.client.swing.Swingclient;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.WebApplicationType;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.builder.SpringApplicationBuilder;
import org.springframework.context.ConfigurableApplicationContext;

@SpringBootApplication
public class ChatClientAPPlication {
    public static void main(String[] args) {
//        ConfigurableApplicationContext applicationContext = SpringApplication.run(ChatClientAPPlication.class, args);
//        System.setProperty("java.awt.headless", "false");
        SpringApplicationBuilder builder = new SpringApplicationBuilder(ChatClientAPPlication.class);
        ConfigurableApplicationContext run = builder.headless(false).web(WebApplicationType.NONE).run(args);
        Swingclient swing = run.getBean(Swingclient.class);
        swing.setVisible(true);
    }

}
